import request from '@/utils/request'
export default {
    //分页查询订单
    getPageByCondition(page,pageSize,orderSelectByConditionVO){
        return request({
            url:`/ordersservice/order/selectPageByCondition/${page}/${pageSize}`,
            method:'post',
            data:orderSelectByConditionVO
        })
    },
    //批量删除订单
    deleteOrders(ids){
        return request({
            url:"/ordersservice/ordermanage/deleteOrders",
            method:'delete',
            params: {ids:ids}
        })
    },
    //接单和派单
    accept(id){
        return request({
            url:`/ordersservice/ordermanage/accept/${id}`,
            method:'post'
        })
    },
    //订单确认
    showOrder(ids){
        return request({
            url:"/ordersservice/order/showOrder",
            method:'get',
            params: {ids:ids}
        })
    },
    //生成订单
    createOrder(ids,createOrdersVo){
        return request({
            url:"/ordersservice/order/createOrder",
            method:'post',
            params:{ids:ids},
            data:createOrdersVo
        })
    },
    //根据订单id查询订单信息
    getOrderInfo(ordersNumber){
        return request({
            url:`/ordersservice/order/getOrderInfo/${ordersNumber}`,
            method:'get'
        })
    },
    //生成二维码的方法
    createNative(ordersNumber){
        return request({
            url:`/ordersservice/orderPayLog/createNative/${ordersNumber}`,
            method:'get'
        })
    },
    //查询订单状态
    queryPayStatus(ordersNumber){
        return request({
            url:`/ordersservice/orderPayLog/queryPayStatus/${ordersNumber}`,
            method:'get'
        })
    }
}